//-------------------------------------------------------------------------
// File: BackBuffer.cpp
//
// Descr.: - todo -
//
// Author: Stefan Leihkauf
// Date:   17.08.2011
//-------------------------------------------------------------------------
#include "cb_pch.h"
#include "BackBuffer.h"

namespace cb { namespace unsorted {

uint PixelsizeFromFormat(ColorFormat fmt)
{
    uint iRet = 0;

    switch (fmt) {
        case cb::unsorted::FMT_Unknown:
            iRet = 0;
        break;

        case cb::unsorted::FMT_RGB565:
            iRet = 2;
        break;

        case cb::unsorted::FMT_RGB888:
            iRet = 4;
        break;
        
        default:
            iRet = 0;
        break;
    }

    return iRet;
}

//-------------------------------------------------------------------------
/**
*/
BackBuffer::BackBuffer() :
m_Width(0), m_Height(0), 
m_Format(FMT_Unknown), 
m_Stride(0),
m_Pixelsize(0)
{ 
}

//-------------------------------------------------------------------------
/**
*/
BackBuffer::~BackBuffer()
{
}


}} // cb::unsorted